<template>
   <van-pull-refresh v-model="refreshing" style="padding-bottom:30px;" @refresh="onRefresh">
            <div class="zm-list">
                <van-list :offset="10" v-model="loading" :immediate-check='false' :finished="finished" @load="loadData" :finished-text="list.length?'~我也是有底线的':'~暂无数据'">
                    <zm-item v-for="(item,index) in list" :data="item" :key="index"></zm-item>
                </van-list>
            </div>
        </van-pull-refresh>
</template>

<script>
import { PullRefresh,List} from 'vant';
import zmItem from "./zm-item"
export default {
  name:"zm-list",
  components:{
    [PullRefresh.name]:PullRefresh,
    [List.name]:List,
    zmItem
  },
  props: {
    value: {
      type: String,
      default: "",
    },
  },
  data: function () {
    return {
      refreshing: false,
      list: [],
      loading:false,
      finished:false
    };
  },
  mounted() {
    this.loadData();
  },
  methods: {
    onRefresh: function () {
      initData.searchData.limit = 1;
      this.getData(true);
    },
    loadData: function () {
      self.loading = true;
      this.getData();
    },
    getData(init) {
      this.list = [];
      this.refreshing = false;
    },
  },
  watch: {},
}
</script>

<style>

</style>